package com.service;

import java.util.List;

import com.dao.EmployeeDao;
import com.model.DoorDetail;
import com.model.DoorOrder;
import com.model.Employee;
import com.model.Orders;
import com.model.Product;

public class EmployeeService {
	EmployeeDao dao  = new EmployeeDao();
	
	//修改信息
	public Employee update(Employee e,String ephone,String eaddress) throws Exception {
		return dao.update(e, ephone, eaddress);
	}
	
	//修改密码
	public void changepass(Integer eid, String oldpass, String newpass) throws Exception {
		dao.changepass(eid,oldpass, newpass);
	}
	
	//查看上门预约订单
	public List<DoorOrder> query(Integer eid,String uname){
		return dao.query(eid,uname);
	}
	
	//查看预约上门订单详细情况
	public List<DoorDetail> queryDetail(Integer eid,String uname){
		return dao.queryDetail(eid,uname);
	}
	
	//删除
	public void del(String oid, Integer pid,Double tprice) throws Exception {
		dao.del(oid,pid,tprice);
	}

	
	//保存
	public void save(String oid, Integer pid, Double weight, Double tprice,Double oldtprice) throws Exception {
		dao.save(oid, pid,weight,tprice,oldtprice);
	}

	public void add(DoorDetail detail, Integer eid) throws Exception {
		dao.add(detail,eid);
		
	}

	

	public List<Product> allproducts() {
		return dao.allproducts();
	}

	public Orders order(String oid) {
		return dao.order(oid);
	}

	public Double returnPrice(String pname) {
		
		return dao.returnPrice(pname);
	}

	
	
	
	
}
